package cn.edu.scau.cmi.xiaozecheng.adapter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xiao
 * @date 2019/10/14/014 4:09 PM
 */
public class SortUtil {
    public List<Integer> sortInt(List<Integer> inList) {
        List<Integer> list = new ArrayList<>(inList.size());
        list.addAll(inList);
        for (int i = 0; i < list.size(); i++) {
            for (int j = 0; j < i; j++) {
                if (list.get(i) < list.get(j)) {
                    Integer tmp = list.get(i);
                    list.set(i, list.get(j));
                    list.set(j, tmp);
                }
            }
        }
        return list;
    }
}
